/*
 * @Author: askMeWhy
 * @Date:   2018-07-05 09:57:53
 * @Last Modified by: AskMeWhy
 * @Last Modified time: 2021-01-21 20:09:57
 */
/*
调用方式 [namespace/name]
有namespace=>[namespace/name]
无namespace=>[name]

{
    name: '', //函数名
    namespace: '', //命名空间
    setCommonParam: true, //设置公共参数 true：需要 false：不需要|默认值
    method:'GET', //请求方式
    params:{}, //本接口在未设置的时候请求带上的默认值
    path:'', //接口api地址
    desc:'' //接口描述信息
}
 */
import ApiCommon from "./api.common";
import ApiOrganization from "./api.organization";
import ApiResource from "./api.resource";
import ApiModuleManage from "./api.module.manage";
import ApiTask from "./api.task";
import ApiRegional from "./api.regional";
import ApiSystemManage from "./api.system.manage";
import ApiProcessManage from "./api.process";
import ApiBusinessConfig from "./api.business.config";
import ApiRetrieval from "./api.retrieval";
import ApiProjectManage from "./api.project.mannage";
import ApiOverView from "./api.overview";
import ApiTownView from "./api.town-view";
import ApiResourceMap from "./resource.map";
import ApiDeclare from "./api.declare";
import ApiRescourceData from "./api.resource.data";
import ApiUserList from "./api.user.list";
import ApiImportCreateList from "./api.import.create";

export interface ServerModel {
    name: string; // 函数名
    namespace?: string; // 命名空间
    setCommonParam?: boolean; // 设置公共参数 true：需要 false：不需要|默认值
    headers?: any; // 请求头
    method: string; // 请求方式
    data?: any; // 本接口在未设置的时候请求带上的默认值
    queryString?: boolean; // 以queryString模式传递参数，当请求方式不为GET和DELETE的时候
    // 接口api公共前缀地址，不传递默认取BaseURL，传了则取对应字段，没有取到则使用BaseURL，
    // 例如preFixUrl: "AuthURL",则取config里面的AuthURL没有则是BaseURL
    preFixUrl?: string;
    path: string; // 接口api地址
    desc?: string; // 接口描述信息
}

const API_CONFIG: Array<ServerModel> = [
    ...ApiCommon,
    ...ApiOrganization,
    ...ApiResource,
    ...ApiModuleManage,
    ...ApiTask,
    ...ApiRegional,
    ...ApiSystemManage,
    ...ApiProcessManage,
    ...ApiBusinessConfig,
    ...ApiRetrieval,
    ...ApiProjectManage,
    ...ApiOverView,
    ...ApiTownView,
    ...ApiResourceMap,
    ...ApiDeclare,
    ...ApiRescourceData,
    ...ApiUserList,
    ...ApiImportCreateList
];
export default API_CONFIG;
